Hello,

I'm creating a project FOXEFDE.Project's idea=You can play a lot of diffirent games,earn dollers,buy a strong pet,train him,win a tourneys ...At the moment project got 1500Lines, 3games have been added,as well choice of pet.I really want ,that fourth game would be snake,but i'm just failing to make it move,if she grows...Any suggestions?Really need some help :|

The code is at:Foxefde C++ - Home
Also all my little projects!

Or just:

insert
Code:
#include <cstdlib>
#include <Windows.h>
#include <iostream>
#include <ctime>

double Scoore=0;
int a7,b7,c7=0,n7=0,jk8,Tempone,FakeBeard,kja145=0,rad,loasf=0,xd,FailRandm, nothing1=0, x=729,SnakeLength=2,TempSnakeLength,AnotherTempSnakeLength;
char foxas [2800],l=205,kkas=186;
void clearscreen();
void ToGetRandomApple();
void CheckRight();
void CheckLeft();
void ramu();
using namespace std;

int main() {
    cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n      CoNsT SnaKe                    By Foxefde  2013 \n";
    Sleep(2800);
    system("cls");
system("color 30");
bool down=0,left=0,right=0,up=0,jkj=false;
    rad=rand()%2800;
    srand((unsigned)time(0));
do{
        cout<<"Dollers="<<Scoore/125<<endl<<endl<<char(201);ramu();cout<<char(187)<<endl;
for(a7=0;a7<2800;a7++)
{
TempSnakeLength=SnakeLength;
AnotherTempSnakeLength=TempSnakeLength;
if(xd==69       || xd==139 || xd==209 || xd==279 || xd==349 || xd==419 || xd==489 || xd==559 || xd==629 || xd==699 || xd==769 || xd==839
                || xd==909 || xd==979 || xd==1049|| xd==1119 || xd==1189 || xd==1259 || xd==1329 || xd==1399 || xd==1469 || xd==1539 || xd==1609
                || xd==1679 || xd==1749 || xd==1819 || xd==1889 || xd==1959 || xd==2029 || xd==2099|| xd==2169 || xd==2239 || xd==2309 || xd==2379
                || xd==2449 || xd==2519 || xd==2589 || xd==2659 || xd==2729 || xd==2799 ){jkj=true;cout<<kkas;}

    if(x!=a7 && rad!=a7 && jkj==false){foxas[a7]=' ';cout<<foxas[a7];}
    else {foxas[x]='o';if(x==a7){

            if(right==true){do{cout<<foxas[x];TempSnakeLength--;}while(TempSnakeLength>0);}
            if(up==true)   {do{cout<<foxas[x];TempSnakeLength--;}while(TempSnakeLength>0);}
            if(down==true) {do{cout<<foxas[x];TempSnakeLength--;}while(TempSnakeLength>0);}
            if(left==true) {do{cout<<foxas[x];TempSnakeLength--;}while(TempSnakeLength>0);}

    };}


    if(rad==a7){foxas[rad]=char(3);cout<<foxas[rad];}
    c7++;
    xd++;

    jkj=false;
    if(c7==70+n7) {cout<<endl;n7=n7+70;}
      if(GetAsyncKeyState(VK_LEFT)) {
   if(right==false){down=false,up=false,right=false;left=true;}
  }
  else if(GetAsyncKeyState(VK_RIGHT)) {
   if(left==false){left=false,up=false,down=false;right=true;}
  }
  else if(GetAsyncKeyState(VK_UP)) {
   if(down==false){left=false,down=false,right=false;up=true;}
  }
  else if(GetAsyncKeyState(VK_DOWN)) {
   if(up==false){left=false,up=false,right=false;down=true;}
  }
    if(a7==2799)
                               {
                                   cout<<char(200);ramu();cout<<char(188)<<endl;;
                                   if(right==true && up==false) {CheckRight();ToGetRandomApple();};
                                   if(up==true && right==false) {ToGetRandomApple() ;x=x-70;    ;Sleep(15);};
                                   if(down==true && up==false)  {ToGetRandomApple() ;x=x+70;    ;Sleep(15);};
                                   if(left==true && up==false)  {CheckLeft(); ToGetRandomApple();};
                                   clearscreen();
                               }
    }

}while(true);
}
void clearscreen()
{
    HANDLE hOut;
    COORD Position;

    hOut = GetStdHandle(STD_OUTPUT_HANDLE);

    Position.X = 0;
    Position.Y = 0;
    SetConsoleCursorPosition(hOut, Position);
}

void ToGetRandomApple()
{
    if(x<0 || x>2800){system("cls");cout<<endl<<"\n\nGame Over!";cout<<"You earned:"<<Scoore/125;cin.ignore();}
    if(foxas[rad]==foxas[x]){
    Scoore+=2;
    SnakeLength++;
    srand (time(NULL));
    rad=rand()%52;
    srand((unsigned)time(0));
    FailRandm=rand()%52;
    rad*=FailRandm;
    foxas[rad]=249;
    Beep(800,18);Beep(340,24);Beep(300,21);Beep(400,32);Beep(500,19);Beep(150,8);Beep(2890,10);Beep(255,8);Beep(102,4);

}}

void CheckRight()
{
if(x==69 || x==139 || x==209 || x==279 || x==349 || x==419 || x==489 || x==559 || x==629 ||
x==699 || x==769 || x==839 || x==909 || x==979 || x==1049|| x==1119 || x==1189 || x==1259 ||
x==1329 || x==1399 || x==1469 || x==1539 || x==1609 || x==1679 || x==1749 || x==1819 || x==1889
|| x==1959 || x==2029 || x==2099|| x==2169 || x==2239 || x==2309 || x==2379 || x==2449 || x==2519
|| x==2589 || x==2659 || x==2729)
{x=-1;ToGetRandomApple();}
else {x++;}
}
void CheckLeft()
{
if(x==70 || x==140 || x==210 || x==280 || x==350 || x==420 || x==490 || x==560 || x==630 ||
    x==700 || x==770 || x==840 || x==910 || x==980 || x==1050|| x==1120 || x==1190 || x==1260
     || x==1330 || x==1400 || x==1470 || x==1540 || x==1610 || x==1680 || x==1750 || x==1820 ||
      x==1890 || x==1960 || x==2030 || x==2100|| x==2170 || x==2240 || x==2310 || x==2380 ||
      x==2450 || x==2520 || x==2590 || x==2660 || x==2730)
{x=-1;ToGetRandomApple();}
        else {x--;}
}
void ramu()
{
    cout<<l<<l<<l<<l<<l<<l<<l<<l<<l<<l<<l<<l<<l<<l<<
        l<<l<<l<<l<<l<<l<<l<<l<<l<<l<<l<<l<<l<<l<<l<<l<<l<<l<<l<<l<<l<<l<<l<<l<<l<<l<<l<<l<<l<<l<<
        l<<l<<l<<l<<l<<l<<l<<l<<l<<l<<l<<l<<l<<l<<l<<l<<l<<l<<l<<l<<l<<l<<l<<l<<l;
}